<%@ page import="com.sg.pojo.Grade" %>
<%@ page import="com.sg.service.GradeService" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加新学生</title>
    <style>
        body{
            background-image: url("../addsub/images/1.jpg");
        }
    </style>
</head>
<body>
<%

    List<Grade> grades = GradeService.ME.getAll();

%>
<form action="doAddStu.jsp" style="width: 80%;text-align:center; margin: 0 auto" method="get">
    <h1 style="text-align: center">统计学生信息表</h1>
    <p>
        姓名:<input type="text" name="stuName">
    </p>
    <p>
        性别:
        <input type="radio" name="sex" value="男">男
        <input type="radio" name="sex" value="女">女
        <input type="radio" name="sex" value="妖">妖
        <input type="radio" name="sex" value="人妖">人妖
    </p>
    <p>
        生日:
        <input type="date" name="birth">
    </p>
    <p>
        电话:
        <input type="text" name="tele" pattern="^1[0-9]{10}$">
    </p>
    <p>
        QQ:
        <input type="text" name="qq" pattern="^[0-9]*$">
    </p>
    <p>
        微信:
        <input type="text" name="wechat" pattern="^\w*$">
    </p>
    <p>
        年级:
        <select name="gradeId">
            <%
                for (Grade grade : grades) {
            %>
            <option value="<%=grade.getId()%>"><%=grade.getGname()%></option>
            <%
                }
            %>
        </select>
    </p>
    <p>
        入学日期:
        <input type="date" name="enterDate">
    </p>
    <p>
        城市:
        <select name="city">
            <option>合肥</option>
            <option>蚌埠</option>
            <option>六安</option>
            <option>阜阳</option>
            <option>淮北</option>
            <option>安庆</option>
            <option>滁州</option>
        </select>
    </p>
    <p>
        地址:
        <input type="text" name="address">
    </p>
    <p>
        pass:
        <input type="text" name="pass">
    </p>
    <p>
        照片:
        <input type="text" name="pic">
    </p>
    <p>
        <input type="submit" value="添加">
    </p>

</form>
</body>
</html>
